#ifndef PLCCONTROLCMD_H
#define PLCCONTROLCMD_H

#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonParseError>
#include <QObject>

class PLCControlCmd : public QObject
{
    Q_OBJECT
public:
    PLCControlCmd();

private:
    QString cmd;
    QString content;

public:
    void SetCmd(QString cmd);
    void SetContent(QString content);

    const QString &GetCmd() const;
    const QString &GetContent() const;

    PLCControlCmd &operator=(PLCControlCmd &other);

public:
    QString toJson() const;
    bool FromJson(QString jsonStr);
    bool FromJson(QJsonObject jsonObject);
};

#endif // PLCCONTROLCMD_H
